package com.zaimokuza.cn.entity.blog;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;

/**
 * @author zaimokuza
 */
@ApiModel("博客")
@Data
public class Blog {

    @ApiModelProperty("ID")
    private String id;
    @ApiModelProperty("作者ID")
    private String authorId;
    @ApiModelProperty("作者名称")
    private String authorName;
    @ApiModelProperty("作者域名")
    private String authorDomain;
    @ApiModelProperty("作者头像")
    private String authorAvatar;
    @ApiModelProperty("标题")
    @NotBlank(message = "请填写博客标题！")
    private String title;
    @ApiModelProperty("摘要")
    @NotBlank(message = "请填写博客摘要！")
    private String summary;
    @ApiModelProperty("内容")
    @NotBlank(message = "请填写博客内容！")
    private String content;
    @ApiModelProperty("分类ID")
    @NotBlank(message = "请选择博客分类！")
    private String classificationId;
    @ApiModelProperty("展示字段，分类名称")
    private String classificationName;
    @ApiModelProperty("标签ID集合")
    private ArrayList<String> tagIdList;
    @ApiModelProperty("标签信息集合")
    private ArrayList<Tag> tagList;
    @ApiModelProperty("点赞数")
    private Integer likes;
    @ApiModelProperty("浏览量")
    private Integer pageViews;
    @ApiModelProperty("创建时间")
    private String createdTime;
    @ApiModelProperty("更新时间")
    private String updatedTime;
    @ApiModelProperty("展示字段，评论集合")
    private ArrayList<Comment> comments;
    @ApiModelProperty("是否点赞")
    private Boolean isLike;
    @ApiModelProperty("是否为作者")
    private Boolean isAuthor;

}
